package com.atguigu.controller;

import com.atguigu.service.UserService;
import com.atguigu.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private UserService userService ;

    @GetMapping("/list")
    public Result findAll(){
        return Result.ok(userService.findAll()) ;
    }
}
